<ion-view title="商品分类">
  <ion-nav-buttons side="left">
      <button menu-toggle="left" class="button button-icon icon ion-navicon-round"></button>
  </ion-nav-buttons>
    <ion-nav-buttons side="right">
        <button class="button button-icon icon ion-plus-round" ng-click="add()"></button>

    </ion-nav-buttons>
  <ion-content class="has-header" has-bouncing="true" overflow-scroll="false">
      <ion-refresher pulling-text="下拉刷新" refreshing-text="玩命加载中, 请稍候..." refreshing-icon="ion-loading-c" on-refresh="refresh()" >
      </ion-refresher>
      <div id="nullStore" style="font-size: 18px;height: 300px;text-align: center;display: none">
      <span style="line-height: 300px">当前没有数据</span>
      </div>
      <ion-list>
          <ion-item ng-repeat="data in datas" href="#/app/goods/{{data._id}}" >
              <div class="row" style="padding: 0px;">
                  <div class="col col-33" style="" >
                      <div style="float: left">{{data.name}}</div>
                  </div>
                  <div class="col" style="padding: 0px;">

                      <a class="button button-small button-assertive" style="padding: 0px 20px;float: right;margin-left: 5px" ng-click="showConfirm('{{data._id}}',$index)">删除</a>
                      <a class="button  button-small button-balanced" style="padding: 0px 20px;float: right" ng-click="showPopup('{{data._id}}',$index)">修改</a>

                  </div>
              </div>
          </ion-item>
      </ion-list>
      <div style="text-align: center;">
          <div id="testId" ng-if="show" class="alert">
              <span style="padding: 10px;background-color: #000000;color: #ffffff">{{message}}</span>
          </div>
      </div>
      <ion-infinite-scroll ng-if="isMore" icon="ion-loading-c" on-infinite="loadMoreData()" distance="1%"></ion-infinite-scroll>
  </ion-content>
</ion-view>
